{extend name="PublicBase/showBase" /}

{block name="body"}
<link rel="stylesheet" href="__JS__/vendor/tabdrop/css/tabdrop.css" />
<link rel="stylesheet" href="__CSS__/tabs.css" />
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <section class="tile color transparent-black">
                <div class="tile-header">
                    <h1>{:lang('WxPzKj')}</h1>
                    <div class="controls">
                        <a href="{:url('WechatConfs/showBase')}"><i class="fa fa-refresh"></i></a>
                    </div>
                </div>
                <div class="tile-widget bg-transparent-black-2" style="padding-top:0">
                    <div class="row">
                        <div class="col-sm-12">
                            <ul class="nav nav-tabs tabdrop">
                                {notempty name="Group"}
                                    {volist name="Group" id="vo" key="key"}
                                        <li {eq name="key" value="1"}class="active"{/eq}><a href="#{$vo.group_type}-tab" data-toggle="tab">{$vo.group_name}</a></li>
                                    {/volist}
                                {/notempty}
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="tile-body nopadding">
                    <form class="FormTable" action="" method="post">
                        <div class="tile-body tab-content nopadding rounded-bottom-corners" style="background-color: transparent;">
                            {notempty name="Lists"}
                                {volist name="Lists" id="vo" key="key"}
                                    <ul id="{$vo.group_type}-tab" class="tab-pane fade {eq name="key" value="1"}in active{/eq}" style="padding: 5px 0 0 0;">
                                        <div class="tile-body">
                                            <div class="row">
                                                {volist name="vo['group_list']" id="group"}
                                                    {if condition="$group.config_type eq 1"}
                                                        <div class="form-group col-sm-12">
                                                            <label>{$group.config_title}</label>
                                                            <input type="text" class="form-control" name="{$group.config_name}" value="{$group.config_value}" placeholder="{$group.config_remark}">
                                                        </div>
                                                    {elseif condition="$group.config_type eq 2" /}
                                                        <div class="form-group col-sm-12">
                                                            <label>{$group.config_title}</label>
                                                            <select class="chosen-select chosen-transparent form-control" name="{$group.config_name}"> 
                                                                {volist name="group['config_select']" id="select"}
                                                                    <option value="{$select}" {eq name="select" value="$group['config_value']"}selected{/eq}>{$select}</option>
                                                                {/volist}
                                                            </select>
                                                        </div>
                                                    {/if}
                                                {/volist}
                                            </div>
                                        </div>
                                    </ul>
                                {/volist}
                            {/notempty}
                        </div>
                    </form>
                </div>
                <div class="tile-footer bg-transparent-black-2 rounded-bottom-corners">
                    <div class="row">
                        <div class="col-sm-12 text-center">
                            <button type="button" class="btn btn-{:config('CNF_BTNCOLOR')} ajax-post">{:lang('XtAnTj')}</button>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>
{/block}

{block name="script"}
    <script src="__JS__/vendor/tabdrop/bootstrap-tabdrop.min.js"></script>

    <script>
        $(function(){
            $('.tabdrop').tabdrop({text: '<i class="fa fa-th-list"></i>'});
        })
    </script>
{/block}